package com.hls.controller;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.hls.mvc.annotation.Controller;
import com.hls.mvc.annotation.RequestMapping;
import com.hls.mvc.core.Model;

@Controller
@RequestMapping("/home")
public class HomeController {
    
    @RequestMapping("/index2")
    public String index2()
    {
        return "index";
    }
    
    @RequestMapping("/index")
    public String index(HttpServletRequest request,HttpServletResponse response)
    {
        request.setAttribute("name", "longsheng");
        return "index2";
    }
    
    @RequestMapping("/index3")
    public String index3(Model model)
    {
        model.addAttribute("model_name", "model name longsheng");
        model.addAttribute("model_type", "Model MVC Type");      
        return "index3";
    }

}
